//
//  TransitionCustom.h
//  Jump
//
//  Created by Zach Wang on 14-5-16.
//
//

#ifndef __Jump__TransitionCustom__
#define __Jump__TransitionCustom__

#include "cocos2d.h"
USING_NS_CC;

/**
 *  扇形旋转向左转动
 */
class TransitionSectorSlideInL : public TransitionScene
{
public:
    static TransitionSectorSlideInL* create(float t, Scene* scene);
    
    //
    // Overrides
    //
    virtual void onEnter() override;
    
protected:
    TransitionSectorSlideInL();
    virtual ~TransitionSectorSlideInL();
    
    /** initializes the scenes */
    virtual void initScenes(void);
    
    virtual void sceneOrder() override;
    
    /** 是否向左旋转 */
    void setSlideLeft(bool);
    
private:
    CC_DISALLOW_COPY_AND_ASSIGN(TransitionSectorSlideInL);
    bool isLeft = true;
};

/**
 *  扇形旋转向右转动
 */
class TransitionSectorSlideInR : public TransitionSectorSlideInL
{
public:
    static TransitionSectorSlideInR* create(float t, Scene* scene);
    
    //
    // Overrides
    //
    virtual void onEnter() override;
    
protected:
    TransitionSectorSlideInR();
    virtual ~TransitionSectorSlideInR();
    
    /** initializes the scenes */
    virtual void initScenes(void);
    
    virtual void sceneOrder() override;
    
private:
    CC_DISALLOW_COPY_AND_ASSIGN(TransitionSectorSlideInR);
};



/**
 *  类似于两块活动板从中间上下拆开合并的
 动画
 */
class TransitionCameraBezel : public TransitionScene
{
public:
    static TransitionCameraBezel* create(float t, Scene* scene);
    
    //
    // Overrides
    //
    virtual void onEnter() override;
    
    /**
     *  set animation's degree
     *  合并时光栅板合并角度
     *
     *  @param degree degree
     */
    void setBezelDegree(int degree);
    
    /**
     *  background
     *
     *  @param bezel
     */
    void setBezelBackground(Sprite* bezel);
protected:
    TransitionCameraBezel();
    virtual ~TransitionCameraBezel();
    
    /** initializes the scenes */
    virtual void initScenes(void);
    
    virtual void sceneOrder() override;
private:
    int degree = 30;
    
    Sprite* bezelBackground;
};


#endif /* defined(__Jump__TransitionCustom__) */